package com.c39.otc.open.launcher;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.method.HandlerTypePredicate;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author JiaLing.FanX
 * @version 1.0
 * @description: TODO
 * @date 2025/9/12 13:34
 */
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void configurePathMatch(PathMatchConfigurer configurer) {
        // 给所有Controller添加/api前缀
        configurer.addPathPrefix("/",
                HandlerTypePredicate.forAnnotation(RestController.class));
    }
}